﻿// See https://aka.ms/new-console-template for more information
using APP;
using AutoParameter;

var rootNode = new FlowNode
{
    NodeName = "Root",
    NodeType = typeof(ExampleNode),
    NodeInstance = new ExampleNode(),
    Children = new List<FlowNode>
    {
        new FlowNode
        {
            NodeName = "Child1",
            NodeType = typeof(ExampleNode),
            NodeInstance = new ExampleNode()
        }
    }
};

var executor = new FlowExecutor(rootNode);
var context = new FlowContext
{
    GlobalInput = new InputModel { Value = 10 },
    GlobalOutput = new OutputModel()
};

await executor.ExecuteAsync(context);

Console.WriteLine(((OutputModel)context.GlobalOutput).Result);